#!/bin/bash
echo "=== Testing Shorthand Function Definition ==="
echo ""

echo "Testing basic shorthand syntax:"
echo '(define (square x) (* x x))\n(square 6)\nexit' | ./ascheme

echo ""
echo "Testing multiple parameters:"
echo '(define (add a b c) (+ a b c))\n(add 1 2 3)\nexit' | ./ascheme

echo ""
echo "Testing recursive function:"
echo '(define (factorial n) (if (= n 0) 1 (* n (factorial (- n 1)))))\n(factorial 4)\nexit' | ./ascheme

echo ""
echo "All tests completed!"